package org.xin.security.service;


import org.xin.framework.base.service.IBaseService;
import org.xin.security.pojo.entity.SysRolePermission;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;
import java.util.Set;

/**
* <p>
    * 系统模块-菜单安全表 服务接口
    * </p>
*
* @author: xin
* @date: Create in 2021-10-08
*/

public interface ISysRolePermissionService extends IBaseService<SysRolePermission> {
    /**
     * @desc <p> 根据角色ID和权限类型查询权限 </p>
     * @author xin
     * @date 2021/10/8
     */
    List<SysRolePermission> selectByRoleId(@NotBlank String roleId, @NotNull Integer permissionType);
    /**
     * @desc <p> 根据角色ID和权限类型查询权限字符 </p>
     * @author xin
     * @date 2021/10/8
     */
    Set<String> selectPermissionByRoleId(final Set<String> permissions, @NotBlank String roleId, @NotNull Integer permissionType);
//    Set<String> selectPermissionByRoleId(@NotBlank String roleId, @NotNull Integer permissionType);
}

